package com.lyf.scm.admin.domain.remote.allocationservice;

import com.github.pagehelper.PageInfo;
import com.lyf.scm.admin.api.dto.*;
import com.rome.arch.core.clientobject.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 直营预测计划_目标与销售计划差异
 *
 * @author wangchlei
 * @date 2020/08/05
 */
@FeignClient(name = "scm-plan-service")
public interface SalePlanDirectlyDifferinRemote {

    /**
     * 按条件查询直营预测计划_目标与销售计划差异(周)
     *
     * @param salePlanDirectlyDifferinDTO
     * @return {@link Response<PageInfo<SalePlanDirectlyDifferinInfoDTO>>}
     **/
    @PostMapping("/api/v1/salePlanDirectlyDiffrein/listByWeek")
    Response<PageInfoExpandDTO<SalePlanDirectlyDifferinInfoDTO>> listWeekBySelective(@RequestBody SalePlanDirectlyDifferinDTO salePlanDirectlyDifferinDTO);

    /**
     * 图表数据接口
     *
     * @param salePlanDirectlyDifferinDTO
     * @return {@link Response<EChartsDTO>}
     **/
    @PostMapping("/api/v1/salePlanDirectlyDiffrein/eChartsData")
    Response<EChartsExpandDTO> listAllByCycles(@RequestBody SalePlanDirectlyDifferinDTO salePlanDirectlyDifferinDTO);

    @PostMapping(value = "/api/v1/salePlanDirectlyDiffrein/export",consumes = MediaType.APPLICATION_JSON_UTF8_VALUE)
    feign.Response export(@RequestBody SalePlanDirectlyDifferinDTO salePlanDirectlyDifferinDTO, @RequestParam("type") Integer type);

    /**
     * 删除直营预测计划目标与销售计划差异
     *
     * @param opSign
     * @return
     */
    @PostMapping("/api/v1/salePlanDirectlyDiffrein/delete")
    Response delete(@RequestParam("opSign") String opSign);
}




















